All Questions
Tagged with sortingquick-sort
78 questions
4votes
1answer
320views
c++ quicksort pivots
Is this code for quicksort using the first index as a pivot correct? Also if I want to use the last or middle index as a pivot how would the whole code change? ...
3votes
1answer
88views
Creating Worst-Case Scenario for QuickSort using Middle Pivot in Java
I've implemented a solution to generate the worst-case scenario for QuickSort using the middle pivot strategy in Java. The goal is to rearrange an input array to produce the worst performance during ...
4votes
4answers
1kviews
Quick Sort Done Lucidly
I've been away from Programming and the Tech Industry for sometime. I thought I'd look at and try some of the older basic stuff. I bushed up to QuickSort and found most existing implementations of it, ...
3votes
3answers
188views
In-place recursive quick sort in C
Here's my second program in C, and my time/space analysis of this code. I have been reading Modern C and I attempted this challenge on page 26. The prior pages are pretty much the only exposure I have ...
2votes
2answers
193views
Quick Sort Program
Quick sort is a sorting algorithm in which we select any random element as pivot from the array and we do the partition of the array around that pivot. Basically we place all the elements smaller than ...
1vote
1answer
158views
K-Way Partitioning QuickSort
I have implemented the K-Way Partitioning algorithm which is based on the Peter Taylor's solution. Which works but i want fill the q array which is the borders of ...
3votes
1answer
362views
High performance 3 Way Quick Sort Implementation
My implementation of 3 way quick sort for strings. It supposed to sort very large set of 800,000,000 objects. This is why I added ...
3votes
0answers
114views
Destructive quick and merge sort
I've implemented a destructive merge and quick sort in common lisp, but the code feels verbose and highly imperative. I was wondering if anyone could offer guidance on idioms that could make the code ...
0votes
1answer
60views
Quicksort Invariant and steps to determine correcteness
I am having trouble with applying to 3 steps needed to proof correctness, most likely because I did not formally study CS or Mathematics and am still learning about loop and class invariants. The ...
3votes
1answer
1kviews
Quicksort using generics in java
The goal is to have a function that can sort a series of all object types that implement the comparable interface. I'm not trying to improve the performance of the sort. I'm only trying to optimize my ...
3votes
1answer
1kviews
Quicksort using Lomuto partition scheme in C
This is my implementation of the divide-and-conquer Quicksort algorithm using the Lomuto partition scheme in C. This is part of a personal project and I'm following Linus Torvalds's coding style. <...
5votes
1answer
145views
Quicksort Algorithm Speed
I have made a sorting algorithm in Python 3. This sorting algorithm is a modified optimized median of 3 quicksort, with network sorting for lists of size up to 16 and for finding the median. I have ...
1vote
1answer
223views
MSD Quick Radix Sort in Place in C++, Object/Pointer Oriented
Memory: O(log2(max)*2)~O(1) Speed: O(log2(max)*n)~O(n) so i did before a MSD Radix Sort in place but i wanted to do one, with out the count, So i join together the quick sort and radix sort. Think as ...
2votes
0answers
83views
Python's quicksort algorithm
I was playing around with sorting methods, brushing up on my algorithms. I have made the following implementation of quicksort: ...
1vote
2answers
171views
QuickSort Algorithm (Python)
This is my implementation of Quick Sort Algorithm : ...